package com.example.paimengshop.client_socket;

import java.io.IOException;
import java.net.Socket;

public class SocketConnect
{
    private Socket socket;

    public SocketConnect()
    {

    }

    public SocketConnect(Socket socket)
    {
        this.socket = socket;
    }

    public void Connect()
    {
        if(socket.isConnected())
        {
            System.out.println("连接成功！");
            new Thread(new ThreadControl(socket)).start();
        }
        else
            System.out.println("连接失败！");
    }
}
